package com.have.blog.admin.controller;

import com.have.blog.base.wrapper.Wrapper;
import com.have.blog.utils.serverInfo.ServerInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/monitor")
@Api(value = "服务监控相关接口", tags = {"系统设置相关接口"})
@Slf4j
public class ServerMonitorController {
    @ApiOperation(value = "获取服务信息", notes = "获取服务信息")
    @GetMapping("/getServerInfo")
    public Wrapper getInfo() {
        ServerInfo server = new ServerInfo();
        server.copyTo();
        return Wrapper.success(server);
    }
}
